package com.jian.java;

import org.junit.Test;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

/**
 * @author Jiange
 * @create 2021-04-04-15:07
 * 封装了基本的增删改查
 */
public class BaseDAO {
    @Test
    public void test1(){
        Type genericSuperclass = this.getClass().getGenericSuperclass();
        ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass;
        Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
        Class actualTypeArgument =(Class) actualTypeArguments[0];
    }
}
